/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.latticeware.xtalk.stack;

import java.awt.Canvas;
import java.awt.Component;
import java.awt.Container;
import java.awt.Panel;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.lang.reflect.Type;
import java.util.HashMap;



/**
 *
 * @author sfisque
 */
public class Card
extends VisualThing
{
    protected HashMap<Integer, Thing> contents;


    public Card( Integer _id )
    {
        super( _id, new Panel() );
        ((Container) visualEntity).setLayout( null );
        
        contents = new HashMap<Integer, Thing>( 7 );
    }
        

    @Override
    protected Type getType()
    {
        return Card.class;
    }


    public void addThing( Button buttonThing )
    {
        contents.put( buttonThing.hashCode(), buttonThing );
        
        ((Container) visualEntity).add( buttonThing.getVisualEntity() );
        buttonThing.getVisualEntity().setLocation( visualEntity.getWidth() / 2, visualEntity.getHeight() / 2 );
        buttonThing.getVisualEntity().setSize( 128, 32 );
        visualEntity.repaint();
    }
    
}
